From 0d313b587b2161688d38dc897d93d0e7d09b0358 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 9 Jan 2006 19:22:33 +0000 Subject: [PATCH] Prevent the first row being focused on map. (#137351, Niklas Knutsson) 2006-01-09 Matthias Clasen * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Prevent the first row being focused on map. (#137351, Niklas Knutsson) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtkentrycompletion.c | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5d2da70733..5d7ca84600 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-09 Matthias Clasen + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): + Prevent the first row being focused on map. (#137351, + Niklas Knutsson) + 2006-01-09 Johan Dahlin * gtk/gtk.symbols: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5d2da70733..5d7ca84600 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2006-01-09 Matthias Clasen + + * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): + Prevent the first row being focused on map. (#137351, + Niklas Knutsson) + 2006-01-09 Johan Dahlin * gtk/gtk.symbols: diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 73505c8153..77dd5d9287 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1446,7 +1446,14 @@ _gtk_entry_completion_popup (GtkEntryCompletion *completion) if (GTK_IS_WINDOW (toplevel)) gtk_window_group_add_window (_gtk_window_get_group (GTK_WINDOW (toplevel)), GTK_WINDOW (completion->priv->popup_window)); + + /* prevent the first row being focused */ + gtk_widget_grab_focus (completion->priv->tree_view); + + gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->tree_view))); + gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->action_view))); + gtk_widget_show (completion->priv->popup_window); gtk_grab_add (completion->priv->popup_window); -- 2.30.2